package com.boruiimage.demo.service;

import com.boruiimage.demo.doMain.ResultModel;
import com.boruiimage.demo.doMain.ResultTools;
import com.boruiimage.demo.doMain.imgInfo;
import com.boruiimage.demo.mapperDao.ImgInfomation;
import com.boruiimage.demo.mapperDao.registerMapperDao;
import com.boruiimage.demo.repository.imgInfoDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class imgInfoImpl implements imgInfoDao {
    @Autowired
    ImgInfomation ifo;
    @Override
    public ResultModel selectByuserName(String userName) {
         try{
             List<imgInfo> list=ifo.mb(userName);

             Map<String,Object>maps=new HashMap<>();
             maps.put("data",list);
             System.out.println(list);
             return ResultTools.result(0,"成功",maps);
         }catch (Exception e){
             return ResultTools.result(1,"失败",null);
         }
    }



}
